[PATCH 14/14] lib-mail: Limit total MIME parameter count per message to 200 000
Content-Type and Content-Disposition parameters are both parsed through
parse_mime_parameters(). A message with many MIME parts each having many
parameters can accumulate millions of struct message_part_param entries.
Add remaining_mime_params to struct message_part_data_limits (combined
budget for both Content-Type and Content-Disposition), initialised to
MESSAGE_PART_DATA_MAX_TOTAL_MIME_PARAMS (200 000). Cap params_count to the
remaining budget before allocating and deduct accordingly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gbp-Pq: Name 0014-lib-mail-Limit-total-MIME-parameter-count-per-messag.patch